package com.rr.springcloud.cilent;

import org.springframework.stereotype.Component;

/**
 * @author RR
 * @date 2021/3/29 17:15
 */

/*
* 统一编写服务降级后调用的方法，
* 记得在PaymentClient的@FeignClient注解中添加fallBack属性
* */

@Component
public class PaymentClientFallBack implements PaymentClient {

    @Override
    public String paymentInfoOK(Integer id) {
        return "===PaymentClientFallBack===，paymentInfoOK" + id;
    }

    @Override
    public String paymentInfoTimeout(Integer id) {
        return "===PaymentClientFallBack===，paymentInfoTimeout" + id;
    }
}
